<?php $this->_extends('_layouts/main_layout'); ?>

<?php $this->_block('title'); ?>
<?php
if (!empty($_SESSION['ga_title']))
{
	echo $_SESSION['ga_title'];
	unset($_SESSION['ga_title']);
}
else
{
	echo 'Free Video Poker Games, Free Online Video Poker Games, Free Online Casual Games with Cash Prizes - MommyMoolah Free Video Poker Game';
}
?>
<?php $this->_endblock(); ?>

<?php $this->_block('keywords');?>
<meta name="keywords" content="<?php echo $site['keywords']; ?>" />
<?php $this->_endblock();?>

<?php $this->_block('description');?>
<meta name="description" content="MommyMoolah: one of the world's leading casual gaming communities. Free online video poker games with real cash prizes. Cash prizes awarded daily. Free to play. Sign up and play today!" />
<?php $this->_endblock();?>

<?php $this->_block('content'); ?>
<?php if(!empty($x)):?>
<script src="<?php echo $js_url; ?>jquery.scrollTo-min.js" type="text/javascript" ></script>
<script type="text/javascript">
window.innerHeight = 581;
window.innerWidth = 800;
window.moveTo(<?php echo $x;?>, <?php echo $y;?>);
(function($){$(window).scrollTo({top:300,left:400});})(jQuery);
window.location.hash = "game";
</script>
<?php endif;?>

	<?php if(!empty($_SESSION['ga_title']) || !empty($user)): ?>
		<script type="text/javascript">
			$(function(){
				$('#main').removeClass('homebg').css("background", '#FCFAED url("<?php echo $img_url;?>mainbg_04.png") no-repeat');
			});
		</script>
		<div class="mm createaccount" style="margin-left:-2px;padding-bottom:0">
		<?php if(!empty($_SESSION['ga_title'])):?>
			<div style="font-weight:700;font-size:16px;">
				<h3>Thank You! You Have Received Your 5 FREE Spins!</h3>
				<p>We have sent you a welcome e-mail. Please go to your mailbox, 
				complete your registration and receive another 5 spins today! To ensure you receive our emails in your inbox (not a bulk folder), add no-reply@mommymoolah.com to your address book.</p>
				<p>Now continue playing the game by spinning the slot below. When you run out of spins, participate in our sponsored offers
				to receive more spins. Good luck!</p>
			</div>
		<?php 
				unset($_SESSION['ga_title']);
			else:
		?>
				<?php if($user['credit']<1):?>
					<div class="title">Get Another Credit Now!</div>
						<hr width="740px"/>
					<p style="font-weight:700;font-size:20px;margin-bottom:20">
						You can get more credits by participating in the offers from our sponsors. Our sponsors keep MommyMoolah 
						FREE and they pay for the cash prizes. check out  <a href="<?php echo url('offer/morecredit'); ?>" style="color:white">Get More Credits</a>.
					</p>
				<?php else:?>
				<div class="title">Play now!</div>
					<hr width="740px" />
				<p style="font-weight:700;font-size:16px;margin-bottom:20" id="hint">
					You have credits! Each credit is a chance to win the jackpot and other prizes! When your account balance reaches $20, you can request a cash out. Keep playing and winning!
				</p>
				<?php endif;?>
		<?php endif;?>
			<div class="topad">
				<?php echo str_replace('[[USER_ID]]', $user['id'], $site['ad_top']);?>
			</div>
		</div>
		<div class="mb" style="margin-left:-2px;"></div>
	<?php else:?>
			<div class="clear"></div>
			<div id="congratulations">
			<div class="playnow left white">
				<?php 
					if(empty($user) && isset($_SESSION['PLAYED'])):
				?>
					<div class="clear" style="height:37px;"></div>
					<div class="win1" style="padding-top:20px">
						<img alt="" src="<?php echo $img_url; ?>youjustwon.png" width="307" height="150">
					</div>
				<?php else: ?>
				<div class="win"><img src="<?php echo $img_url; ?>playnow.png" alt=""/></div>
				<div class="txt1">In this game, you can win cash<br/> prizes everyday, it's FREE to play!<br/> Get started by clicking below to<br/> play NOW! </div>
				<?php endif;?>
			</div>
			<div class="join right white">
				<div class="clear" style="height:90px"></div>
				<div>1. Chance to win money!</div>
				<div>2. Have fun and join a community</div>
				<div>3. It's FREE</div>
				<div class="signup"><a href="<?php echo url('user/register'); ?>"><img src="<?php echo $img_url; ?>signup.png" alt="" /></a></div>
			</div>
			<div class="clear" style="height:15px;" id="separator"></div>
			
			<?php 
				if(empty($user) && isset($_SESSION['PLAYED'])):
			?>
				<div style="background-color: #EBABC6;margin-left:-10px;width:795px;" id="new_account">
					<div class="txt" style="font-size:16px;font-weight:600;padding: 10px">
						Create a FREE account to keep your $1.00 and to receive your next FREE credit. Every play is a chance to win more cash prizes.
					</div>
					<div style="text-align:center;padding-bottom:10px;">
					 	<a href="<?php echo url('user/register');?>">
							<img width="411" height="51" alt="" src="<?php echo $img_url;?>createaccountbtn-1.png">
						</a>
					</div>
				</div>
				<div class="clear" style="height:10px;"></div>
			<?php endif;?>
		</div>
	<?php endif;?>
	<div class="game" id="game">
	<?php $this->_element('poker_body');?>
	</div>
	<div class="social_tags" style="float:right;padding:20px 25px 0 0">
		<!--  facebook like button -->
		<div id="fb-root"></div>
		<script src="http://connect.facebook.net/en_US/all.js"></script>
		<script>(function(d, s, id) {
		  var js, fjs = d.getElementsByTagName(s)[0];
		  if (d.getElementById(id)) {return;}
		  js = d.createElement(s); js.id = id;
		  js.src = "//connect.facebook.net/en_US/all.js#appId=<?php echo $fbsocials['appId'];?>&xfbml=1";
		  fjs.parentNode.insertBefore(js, fjs);
		}(document, 'script', 'facebook-jssdk'));
		</script>
		<fb:like send="false" width="250" show_faces="false"></fb:like>
	</div>
	<div style="clear:both"></div>
	
	<?php if(isset($showMaumdu) && $showMaumdu == true): ?>
		<!-- maudau code begin -->
		<iframe id="maudauIframe" scrolling="no" height="72" frameborder="0" width="100%" marginheight="0" marginwidth="0" src="//www.maudau.com/AdsBar/?appid=1886"></iframe>
		<!-- maudau code end -->
	<?php endif; ?>
	
	<?php if(isset($_SESSION[Q::ini('acl_session_key')]) && $user['credit']<1): ?>
		<script type="text/javascript">
			setTimeout("window.location.href ='<?php echo url('offer/morecredit');?>';", 10000);
		</script>
	<?php endif; ?>

<script type="text/javascript">
function beforePlay(credit)
{
	$('#current_credits').html(credit);
}
function afterPlay(cash, credit, jackpot){
	loginned=<?php echo isset($user) ? 1 : 0;?>;
	if(loginned){
		changeCurrentUserState(cash, credit);
		if(credit==0){
			$('.have').hide();
			$('.title').fadeOut().html('You Have No Credits!').fadeIn('slow');
			$('#hint').fadeOut().html('Get more credits now. You can get more credits by participating in the offers from our sponsors. Our sponsors keep MommyMoolah FREE and increase our jackpot every time someone in our community signs-up. Check out <a href="<?php echo url('offer/morecredit'); ?>" style="color:#E699B9">Get More Credits</a>.').fadeIn('slow');
			$('#credit-tip').show();
		}
	}else{
		won1CreateNew();
	}
	changeJackpotState(jackpot);
}

function changeCurrentUserState(cash, credit){
	$('#current_balance').html('$'+cash);
	$('#current_credits').html(credit);
	$('#current_balance').animate({fontSize:"30px"}, 'slow').animate({fontSize:"12px"}, 'slow');
}

function won1CreateNew(){
	$('.playnow').children().remove();
	$('#congratulations').animate({height:"40px"}, 'slow',  function(){
		var content = '<div class="clear" style="height:37px;"></div><div class="win1" style="padding-top:20px"><img alt="" src="<?php echo $img_url;?>youjustwon.png" width="307" height="150">'
		$('.playnow').append(content);
		var account = '<div style="background-color: #EBABC6;margin-left:-10px;width:795px;" id="new_account"><div class="txt" style="font-size:16px;font-weight:600;padding: 10px">Welcome to MommyMoolah. Create your FREE account to keep your $1.00 and continue playing our game. Register now and we will give you another FREE credit. Every credit is a chance to win more cash prizes! </div><div style="text-align:center;padding-bottom:10px;position:relative;"><div id="reg-tip" style="width:<?php echo $tips['reg-tip']['tip_width']; ?>; position:absolute; left:190px; top:55px; border:solid 2px #D9BED0; background-color:<?php echo $tips['reg-tip']['bg_color']; ?>"><div style="color:#D9BED0; position:absolute; left:180px; top:-10px; font-size:16px;">◆</div><div style="color:<?php echo $tips['reg-tip']['bg_color']; ?>; position:absolute; left:180px; top:-8px; font-size:16px;">◆</div><p style="margin:<?php echo $tips['reg-tip']['tip_padding']; ?>; font-size:<?php echo $tips['reg-tip']['font_size']; ?>; font-weight:bolder; line-height:<?php echo $tips['reg-tip']['tip_lineheight']; ?>; color:<?php echo $tips['reg-tip']['font_color']; ?>; height:<?php echo $tips['reg-tip']['tip_height']; ?>;"><?php echo $tips['reg-tip']['tip_text']; ?></p></div><a href="<?php echo url("user/register");?>"><img width="411" height="51" alt="" src="<?php echo $img_url;?>createaccountbtn-1.png"></a></div></div>';
		$('#separator').after(account);
	});
	$('#congratulations').animate({height:"370px"}, 'slow');
}

function changeJackpotState(jackpot){
	var jackpotStr = jackpot + '';
	var jack = jackpotStr.split('.');
	$('.jackpot').children(':gt(0)').remove();
	var jPics = '';
	for(i=0;i<jack[0].length;i++){
		jPics += '<img alt="" src="img/' + jack[0][i] + '.png">';
	}
	jPics += '<img alt="" src="img/point.png">';
	for(i=0;i<jack[1].length;i++){
		jPics += '<img alt="" src="img/' + jack[1][i] + '.png">';
	}
	$('.jackpot').append(jPics);
}
</script>
<!-- Start Quantcast Tag -->
<script type="text/javascript"> 
_qoptions={qacct:"p-006GF_oN2DAeg",labels:"_fp.channel.Mommy Moolah,_fp.event.Mommy Moolah Homepage"};
</script>
<script type="text/javascript" src="http://edge.quantserve.com/quant.js"></script>
<noscript>
<img src="http://pixel.quantserve.com/pixel/p-006GF_oN2DAeg.gif?labels=_fp.channel.Mommy+Moolah,_fp.event.Mommy+Moolah+Homepage" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/>
</noscript>
<!-- End Quantcast tag -->
<script src="http://action.media6degrees.com/orbserv/hbjs?pixId=7395&pcv=60" type="text/javascript"></script>
<?php if (!empty($user)) { ?>
<script type="text/javascript">
var PeanutLabsPre = (("https:" == document.location.protocol) ? "https://ssl-" : "http://");
document.write(unescape("%3Cscript src='" + PeanutLabsPre + "astatic.peanutlabs.com/js/alert/main.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try{
var args = {
userId:"<?php echo $user['id'].'-4712-'.substr(md5($user['id'].'4712'.'e3d24dc5754aa85b269054f688423a52'), 0, 10 );?>", // Replace #userId# with your visitor's Peanut Labs userId
iframeURL:"http://www.mommymoolah.com/morecredit", // Replace with URL for where you've embedded IFRAME
position_ver:"bottom", //or "top"
position_hor:"right", //use left to show it on the left
hideTimer:"true"
};
peanut.initialize(args);
}
catch(e){}
</script>
<?php } ?>
<?php $this->_endblock('contents'); ?>






			
			
			